Search results

Types

Classes
Interfaces
Enums
Functions
Type aliases
Constants

Members

Properties
Methods
Getters
Setters
Enum members
Show privates

Other

In this module only
index / Guides / Custom Pages

Custom pages

One unique feature of ts-docs is that it allows you to create custom pages directly in the documentation! Custom pages only appear at the landing page in the sidebar, and when in a custom page.

Setup

In order to use custom pages, you must give the customPages setting a path to a directory which contains custom pages categories, which are basically a folder with markdown files inside it.

For example, this is how the custom pages structure looks for this site:

- docsPages
    - Guides
        - CustomMarkdown.md
        - CustomPages.md
        - Options.md

Front Matter

You can also start each custom page file with a metadata header (called front matter) where you can provide some useful metadata for the generator. Possible fields:

---
name: Page Name
order: 5
---

# Markdown content here...
  • name - The name of the page. If not provided, the file name will be used.
  • order - Where the page will be placed.
  • redirect - If provided, the content of the file is ignored, and clicking on the custom page will redirect the user to the URL inside this value.